package com.mf.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.github.heollhai.common.entity.bo.PermissionBo;
import io.github.heollhai.common.entity.bo.RoleBo;
import io.github.heollhai.common.entity.request.publicRequest.PublicBindingIdRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* 角色表
*
* @author mf
* @since 2024-08-06
*/
public interface RoleMapper extends BaseMapper<RoleBo> {
    /**
     * 根据角色id查询权限列表
     */
    List<PermissionBo> selectRolePermissionByRoleIds(@Param("roleIds") List<Integer> roleIds);

    /**
     * 根据用户id绑定角色
     */
    Boolean userBindingRole(@Param("params") PublicBindingIdRequest bindingIdRequest);

    /**
     * 根据角色id查询绑定的用户
     */
    List<String> findUserBindingRoleById(Integer roleId);
}
